<nb-card *ngIf="!(showFilter==false)">
  <nb-card-header>
    条件筛选
  </nb-card-header>
  <nb-card-body>
    <input nbInput class="margin" type="text" placeholder="设备编号" [(ngModel)]="devNo">
    <input nbInput class="margin" type="text" placeholder="设备名称" [(ngModel)]="devName">
    <input nbInput class="margin" type="text" placeholder="设备类型" [(ngModel)]="devType">
    <button nbButton class="margin" status="info" (click)="filter()">搜索</button>
  </nb-card-body>
</nb-card>
<nb-card>
  <nb-card-header>
    设备列表
  </nb-card-header>

  <nb-card-body>
    <ng2-smart-table [settings]="settings" [source]="source" (custom)="onCtrl($event)">
    </ng2-smart-table>
  </nb-card-body>
</nb-card>
<ng-template #dialog let-ref="dialogRef">
  <nb-card style="min-width:800px">
    <nb-card-header>发送指令</nb-card-header>
    <nb-card-body style="max-height: 400px;overflow: auto;">
      <div class="form-group">
        <label>操作列表</label>
        <div>
          <button nbButton status="parimary" size="small" (click)="ref.close()" style="margin-right:20px">同步时钟</button>
          <button nbButton status="info" size="small" (click)="ref.close()" style="margin-right:20px">数据招读</button>
          <button nbButton status="danger" size="small" (click)="ref.close()" style="margin-right:20px">拉闸</button>
          <button nbButton status="warning" size="small" (click)="ref.close()" style="margin-right:20px" disabled>合闸</button>
        </div>
        <label>输入指令</label>
        <textarea class="form-control" nbInput #command></textarea>
        <button nbButton status="success" size="small" (click)="ref.close(command.value)">发送</button>
      </div>
    </nb-card-body>
    <nb-card-footer>
      <button nbButton status="danger" size="small" (click)="ref.close()" style="margin-right:20px">取消</button>
    </nb-card-footer>
  </nb-card>
</ng-template>
